package cjq.demo.thread.ch4_11;

import java.util.concurrent.CompletionService;

/**
 * Created by Administrator on 2016/5/1.
 */
public class ReportRequest implements Runnable {
    private String name;

    private CompletionService<String> service;

    public ReportRequest(String name,CompletionService<String> service){
        this.name = name;
        this.service = service;
    }

    public void run(){
        ReportGenerator reportGenerator = new ReportGenerator(name,"Report");
        service.submit(reportGenerator);
    }
}
